import { axios } from '@/utils/request'

/**
 * 商户管理
 */

export function selectPage (parameter) {
  return axios({
    url: '/shop/merchant/selectPage',
    method: 'post',
    params: parameter
  })
}

export function saveOrUpdate (parameter) {
  return axios({
    url: '/shop/merchant/saveOrUpdate',
    method: 'post',
    data: parameter
  })
}

export function del (parameter) {
  return axios({
    url: '/shop/merchant/' + parameter + '/delete',
    method: 'get'
  })
}

export function resetRealAmount(parameter) {
  return axios({
    url:'/shop/merchant/resetRealAmount',
    method:'post',
    params: parameter
  })
}

export function selectMerchantTree (parameter) {
  return axios({
    url: '/shop/merchant/selectMerchantTree',
    method: 'post',
    params: parameter
  })
}

export function selectAllMerchant () {
  return axios({
    url: '/shop/merchant/selectAllMerchant',
    method: 'get'
  })
}